﻿<Window x:Class="ApiScannerShell.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ViewModels="clr-namespace:ApiScannerShell.ViewModels" xmlns:ApiScannerShell="clr-namespace:ApiScannerShell" DataContext="{Binding ViewModel,RelativeSource={RelativeSource Mode=Self}}"
        Title="{Binding Path=FileName, StringFormat=API Scanner - \{0\}}" MinWidth="600" MinHeight="370" Width="600" Height="370"
        >
    <Grid>
        <Grid.Resources>
            <DataTemplate DataType="{x:Type ViewModels:ScannerConfigurationSectionViewModel}">
                <ApiScannerShell:ScannerConfigurationSectionView ViewModel="{Binding}" />
            </DataTemplate>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Menu Grid.Row="0">
            <MenuItem Header="File">
                <MenuItem Header="New"  Command="{Binding NewCommand}" />
                <MenuItem Header="Open"  Command="{Binding OpenCommand}" />
                <MenuItem Header="Save" Command="{Binding SaveCommand}" />
                <MenuItem Header="SaveAs" Command="{Binding SaveAsCommand}" />
                <Separator />
                <MenuItem Header="Exit"  Command="{Binding CloseCommand}" />
            </MenuItem>
            <MenuItem Header="Tools">
                <MenuItem Header="Run configured tests" Command="{Binding ExecuteTestsCommand}" />
            </MenuItem>
        </Menu>
        <ContentPresenter Grid.Row="1" Content="{Binding Configuration}" />
    </Grid>
</Window>
